package com.caigou.modules.channel.repository

import com.caigou.comm.base.bean.HttpResult
import com.caigou.modules.channel.bean.*
import com.caigou.modules.channel.network.HttpChannelService
import dagger.hilt.android.scopes.ActivityRetainedScoped
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

/**
 * @author #Suyghur.
 * Created on 2021/10/12
 */
@ActivityRetainedScoped
class ChannelRepository @Inject constructor() {

    fun getTeamList(page: Int, limit: Int, userId: String): Flow<HttpResult<TeamBean>> {
        return HttpChannelService.service.getTeamList(page, limit, userId)
    }

    fun getMedalList(userId: String): Flow<HttpResult<MedalBean>> {
        return HttpChannelService.service.getMedalList(userId)
    }

    fun getBlackHouseInfo(userId: String): Flow<HttpResult<BannedBean>> {
        return HttpChannelService.service.getBlackHouseInfo(userId)
    }

    fun getFriendList(page: Int, limit: Int, userId: String): Flow<HttpResult<FriendBean>> {
        return HttpChannelService.service.getFriendList(page, limit, userId)
    }

    fun getFollowList(page: Int, limit: Int, userId: String): Flow<HttpResult<FollowBean>> {
        return HttpChannelService.service.getFollowList(page, limit, userId)
    }

    fun getBlackList(page: Int, limit: Int, userId: String): Flow<HttpResult<BlackBean>> {
        return HttpChannelService.service.getBlackList(page, limit, userId)
    }

    fun receiveMedal(medalId: String, userId: String): Flow<HttpResult<String>> {
        return HttpChannelService.service.receiveMedal(medalId, userId)
    }

    fun wearMedal(medalId: String, userId: String): Flow<HttpResult<String>> {
        return HttpChannelService.service.wearMedal(medalId, userId)
    }

    fun takeOffMedal(medalId: String, userId: String): Flow<HttpResult<String>> {
        return HttpChannelService.service.takeOffMedal(medalId, userId)
    }
}